package com.onpositive.datacollection.editor;

import org.eclipse.swt.widgets.Composite;

import com.onpositive.datamap.core.IDataProperty;
import com.onpositive.datamap.core.impl.DataCollection;
import com.onpositive.semantic.model.api.realm.IRealm;

public class PropValuesView extends CollectionBasedSelectionView {

	public PropValuesView() {
		super("propvalues.dlf");
		setSelectionProvider("d");
		
	}
	@Override
	public void createPartControl(Composite parent) {
		super.createPartControl(parent);

	}

	@Override
	protected Class getTargetClass() {
		return IDataProperty.class;
	}
	public IRealm<?> getData(){
		DataCollection dataCollection = (DataCollection)DataCollectionAcess.collection();
		if (dataCollection==null){
			return null;
		}
		return dataCollection.getRealm();		
	}
	public Object getProps(){
		DataCollection dataCollection = (DataCollection)DataCollectionAcess.collection();
		if (dataCollection==null){
			return null;
		}
		return dataCollection.getProperties(null);
	}
	
	@Override
	protected Object transform(Object value) {
		return value;
	}

}
